package 剑指offer.Month7_07.day12;

public class 二进制中1的个数 {
    public int NumberOf1(int n) {
        int count = 0;
        for (int i = 0; i < 32; i++) {
            if((n & (1 << i)) != 1){
                count++;
            }
        }
        return count;
    }
}
